home *** CD-ROM | disk | FTP | other *** search
/ Champak 106 / Vol 106.iso / games / garfield.swf / scripts / frame_10 / DoAction.as
Encoding:
Text File  |  2010-04-12  |  764 b   |  41 lines

  1. function sound_hel(x_sound)
  2. {
  3.    if(hel_stoped)
  4.    {
  5.       hel_sound.attachSound(x_sound);
  6.       hel_sound.start(0,1);
  7.       hel_stoped = false;
  8.    }
  9.    else
  10.    {
  11.       hel_next = x_sound;
  12.    }
  13. }
  14. function sound_eff(x_sound)
  15. {
  16.    eff_sound.attachSound(x_sound);
  17.    eff_sound.start(0,1);
  18. }
  19. function sound_obs(x_sound)
  20. {
  21.    obs_sound.attachSound(x_sound);
  22.    obs_sound.start(0,1);
  23. }
  24. var hel_stoped = true;
  25. var hel_next = "none";
  26. var hel_sound = new Sound();
  27. hel_sound.onSoundComplete = function()
  28. {
  29.    hel_stoped = true;
  30.    if(hel_next != "none")
  31.    {
  32.       sound_hel(hel_next);
  33.       hel_next = "none";
  34.    }
  35. };
  36. var eff_sound = new Sound();
  37. var obs_sound = new Sound();
  38. var amb_sound = new Sound();
  39. sound_obs("intro");
  40. stop();
  41.